package br.com.ia.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import br.com.enovar.trex.core.model.BaseModel;

@Entity
@Table(name = "pergunta")
@SequenceGenerator(name = "SEQ_PERGUNTA", sequenceName = "SEQ_PERGUNTA")
public class Pergunta extends BaseModel {

	private Integer codigo;

	private String descricao;

	private Variavel variavel;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ_PERGUNTA")
	@Column(name = "cd_pergunta")
	public Integer getCodigo() {
		return codigo;
	}

	public void setCodigo(Integer codigo) {
		this.codigo = codigo;
	}

	@Column(name="ds_pergunta")
	public String getDescricao() {
		return descricao;
	}

	public void setDescricao(String descricao) {
		this.descricao = descricao;
	}

	@ManyToOne
	@JoinColumn(name = "cd_variavel")	
	public Variavel getVariavel() {
		return variavel;
	}

	public void setVariavel(Variavel variavel) {
		this.variavel = variavel;
	}

}
